﻿using System;
using System.Reflection;
using System.Windows.Forms;

namespace APBR_Patch_Mirror
{
    class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }

        public static void LoadASM()
        {
            AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
            {
                using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("APBR_Patch_Mirror.Libs.ZipForge.dll"))
                {
                    Byte[] assemblyData = new Byte[stream.Length];
                    stream.Read(assemblyData, 0, assemblyData.Length);
                    return Assembly.Load(assemblyData);
                }
            };
        }
    }
}
